package org.dromara.Nyt7Claim.domain.vo;

import org.dromara.Nyt7Claim.domain.Nyt7Claim;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import org.dromara.Nyt7PolicyInsurance.domain.vo.Nyt7PolicyInsuranceVo;
import org.dromara.common.excel.annotation.ExcelDictFormat;
import org.dromara.common.excel.convert.ExcelDictConvert;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;



/**
 * 保险理赔视图对象 nyt_7_claim
 *
 * @author yt
 * @date 2024-12-29
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = Nyt7Claim.class)
public class Nyt7ClaimVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 理赔ID
     */
    @ExcelProperty(value = "理赔ID")
    private Long id;

    /**
     * 保险公司id
     */
    @ExcelProperty(value = "保险公司")
    private String companyName;

    /**
     * 区域
     */
    @ExcelProperty(value = "区域")
    private String region;

    /**
     * 险种
     */
    @ExcelProperty(value = "险种", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "insurance_type")
    private String insuranceType;

    /**
     * 已决赔款面积
     */
    @ExcelProperty(value = "已决赔款面积")
    private Long claimArea;

    /**
     * 已决赔款户数
     */
    @ExcelProperty(value = "已决赔款户数")
    private Long claimHouseholds;

    /**
     * 已决赔款总额
     */
    @ExcelProperty(value = "已决赔款总额")
    private Long claimAmount;

    /**
     * 创建时间
     */
    @ExcelProperty(value = "创建时间")
    private Date createTime;

    public void addFields(Nyt7ClaimVo other) {
        this.claimAmount += other.getClaimAmount();
        this.claimArea += other.getClaimArea();
        this.claimHouseholds += other.getClaimHouseholds();
    }
}
